package cn.yto.print.enums;

import lombok.Getter;

@Getter
public enum PrintHandlerEnum {

    /* 快递打印类型枚举 */
    STD_CN("STD-CN", "cainiao", "菜鸟", "caiNiaoMessageHandler", "print.plugin.cainiao"), // 菜鸟标准
    CUST_CN("CUST-CN", "cainiao", "菜鸟", "caiNiaoMessageHandler", "print.plugin.cainiao"), // 菜鸟自定义
    STD_PDD("STD-PDD", "pdd", "拼多多", "pddMessageHandler", "print.plugin.pdd"),
    STD_TIKTOK("STD-TIKTOK", "tiktok", "抖音", "tikTokMessageHandler", "print.plugin.tiktok"),
    STD_KUAISHOU("STD-KUAISHOU", "kuaishou", "快手", "kuaiShouMessageHandler", "print.plugin.kuaishou"),
    STD_JD("STD-JD", "jd", "京东", "jingDongMessageHandler", "print.plugin.jd"),
    STD_XHS_NEW("STD-XHS-NEW", "xiaohongshux", "新版小红书", "xhsnMessageHandler", "print.plugin.xiaohongshux"),
    STD_WXSPHXD("STD-WXSPHXD", "wxsph", "微信视频号", "wxsphMessageHandler", "print.plugin.wxsph"),
    STD_WPH("STD-WPH", "wph", "唯品会", "wphMessageHandler", "print.plugin.wph"),
    STD_DW("STD-DW", "dewu", "得物", "deWuMessageHandler", "print.plugin.dewu"),
    STD_AKC("STD-AKC", "aikucun", "爱库存", "aiKuCunMessageHandler", "print.plugin.aikucun");

    private final String code;
    private final String name;
    private final String desc;
    private final String beanClass;
    private final String locale;

    PrintHandlerEnum(String code, String name, String desc, String beanClass, String locale) {
        this.code = code;
        this.name = name;
        this.desc = desc;
        this.beanClass = beanClass;
        this.locale = locale;
    }

    public static PrintHandlerEnum getPrintTypeEnum(String code) {
        for (PrintHandlerEnum expressPrintTypeEnum : values()) {
            if (expressPrintTypeEnum.code.equals(code)) {
                return expressPrintTypeEnum;
            }
        }
        return null;
    }

}
